﻿using LeonardoNews.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;

namespace LeonardoNews.Server.Models
{
    public class ArticleModel
    {
        public static ArticleModel FromArticle(Article a)
        {
            return new ArticleModel()
            {
                ID = a.ID,
                User = a.User,
                Title = a.Title,
                Text = a.Text,
                ImageUrl = a.ImageUrl,
                VoteResult = a.VoteResult
            };
        }
        public int ID { get; set; }

        public virtual User User { get; set; }

        public string Title { get; set; }

        public string Text { get; set; }

        public string ImageUrl { get; set; }

        public int VoteResult { get; set; }
    }
}